<html lang="en" xmlns:th="http://www.thymeleaf.org">
<script src="static/assets/js/jquery.min.js"></script>
<script type="text/javascript" src="static/js/note-list-img.js"></script>
<div class="row">
    <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
        <div class="widget am-cf">
            <div class="widget-head am-cf">
                <div class="widget-title  am-cf">
                    文章列表&nbsp;&nbsp;
                    <span >
                        <font th:text="${book.title}" id="bookid" th:data="${book.id}"></font>
                    </span>
                    &nbsp;&nbsp;
                    <span class="tpl-table-black-operation">
                    <a th:unless="${showType} eq 'searchNotes'" href="/notebooks" name="tobooklist">
                        <i class="am-icon-reply"></i> 返回笔记本列表
                    </a>
                    </span>
                </div>
            </div>
            <div class="widget-body  am-fr">
                <div class="am-u-sm-12 am-u-md-6 am-u-lg-6">
                    <div class="am-form-group">
                        <div class="am-btn-toolbar">
                            <div class="am-btn-group am-btn-group-xs">
                                <button type="button" class="am-btn am-btn-default am-btn-success" data-note-add="static/templates/ueditor.html">
                                    <!--<span class="am-icon-plus" data-note-edit="/ueditorpage"> 新增</span>-->
                                    <span class="am-icon-plus"> 新增</span>
                                </button>
                                <!--
                                <button type="button" class="am-btn am-btn-default am-btn-secondary" data-note-save="/ueditorpage">
                                    <span class="am-icon-save"> 保存</span>
                                </button>
                                <button type="button" class="am-btn am-btn-default am-btn-warning" data-note-edit="/ueditorpage">
                                    <span class="am-icon-archive"> 审核</span>
                                </button>
                                <button type="button" class="am-btn am-btn-default am-btn-danger" data-note-delete="/ueditorpage">
                                    <span class="am-icon-trash-o"> 删除</span>
                                </button>
                                -->
                            </div>
                        </div>
                    </div>
                </div>
                <div class="am-u-sm-12 am-u-md-6 am-u-lg-3">
                    <div class="am-form-group tpl-table-list-select">
                        <select data-am-selected="{btnSize: 'sm'}">
                            <option value="option1">所有类别</option>
                            <option value="option2">IT业界</option>
                            <option value="option3">数码产品</option>
                            <option value="option3">笔记本电脑</option>
                            <option value="option3">平板电脑</option>
                            <option value="option3">只能手机</option>
                            <option value="option3">超极本</option>
                        </select>
                    </div>
                </div>
                <div class="am-u-sm-12 am-u-md-12 am-u-lg-3">
                    <div class="am-input-group am-input-group-sm tpl-form-border-form cl-p">
                        <input type="text" class="am-form-field ">
                        <span class="am-input-group-btn">
                            <button class="am-btn  am-btn-default am-btn-success tpl-table-list-field am-icon-search" type="button">
                                
                            </button>
                        </span>
                    </div>
                </div>
                <!-- 加载编辑器的容器 -->
                <!--<script id="ueditor" name="ueditor" type="text/plain">这里写你的初始化内容</script>-->
                <!--<div class="am-u-sm-12" id="note-item-content">这里写你的初始化内容</div>-->

                <div class="am-u-sm-12" id="note-item-list">
                    <div class="am-scrollable-horizontal ">
                    <table width="100%" class="am-table am-table-compact am-text-nowrap tpl-table-black ">
                        <thead>
                        <tr>
                            <th>文章缩略图</th>
                            <th>文章标题</th>
                            <th>作者</th>
                            <th>时间</th>
                            <th>操作</th>
                            <!--<th>
                                <div class="tpl-table-black-operation">
                                    <a href="javascript:;">
                                        <i class="am-icon-book"></i> 新建笔记本
                                    </a>
                                </div>
                            </th>-->
                        </tr>
                        </thead>
                        <tbody >
                        <tr th:each="note:${notes}" th:class="${noteStat.odd}?'gradeX':'even gradeC'">
                            <td>
                                <img th:src="${note.imgcover}" th:data-noteid="${note.id}" class="tpl-table-line-img" width="100" height="60" alt="封面"/>
                            </td>
                            <td th:text="${note.title}" class="am-text-middle">Amaze UI 模式窗口</td>
                            <td th:text="${session.user.name}" class="am-text-middle">张鹏飞</td>
                            <td th:text="${#dates.format(note.getCreateDate(),'yyyy-MM-dd HH:mm')}" class="am-text-middle">2016-09-26</td>
                            <td class="am-text-middle">
                                <div class="tpl-table-black-operation">
                                    <a href="/notecontent" class="looknote" th:data-noteid="${note.id}">
                                        <i class="am-icon-list" style="color: #00a23f"></i> 查看
                                    </a>
                                    <a href="javascript:;" class="uploadimg">
                                        <i class="am-icon-cloud-upload" style="color: #ea6e0c" th:data-noteid="${note.id}"></i> 上传封面
                                    </a>
                                    <a href="/removenote" class="tpl-table-black-operation-del delnote"  th:data-noteid="${note.id}" th:data-bookid="${book.id}">
                                        <i class="am-icon-trash"></i> 删除
                                    </a>
                                </div>
                            </td>
                        </tr>

                        </tbody>
                    </table>
                    </div>
                </div>
                <div class="am-u-lg-12 am-cf">

                    <div class="am-fr">
                        <ul class="am-pagination tpl-pagination">
                            <li class="am-disabled"><a href="#">«</a></li>
                            <li class="am-active"><a href="#">1</a></li>
                            <li><a href="#">2</a></li>
                            <li><a href="#">3</a></li>
                            <li><a href="#">4</a></li>
                            <li><a href="#">5</a></li>
                            <li><a href="#">»</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!--上传文件隐藏域-->
<form id="formTag" enctype="multipart/form-data" style="display: none;">
    <div class="uploadImgBtn" id="uploadImgBtn">
        <input class="uploadImg" type="file" name="file" id="tpfile">
        上传封面
    </div>
</form>

</html>